﻿using DAL;
using MODEL;

namespace BLL
{
    public class UserBLL
    {
        public UserBLL(UserDAL dal)
        {
            Dal = dal;
        }

        public UserDAL Dal { get; }


        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public int AddUser(User user)
        {
            try
            {
                return Dal.AddUser(user);
            }
            catch (Exception)
            {

                throw;
            }
        }
        /// <summary>
        /// 显示
        /// </summary>
        /// <param name="index"></param>
        /// <param name="size"></param>
        /// <returns></returns>
        public dynamic showUser(int index, int size)
        {
            try
            {
               return Dal.showUser(index, size);

            }
            catch (Exception)
            {

                throw;
            }
        }


        public List<User> GetUsers()
        {
           return Dal.GetUsers();
        }



    }
}
